package com.xuzimian.globaldemo.mq.rabbitmq.constants;

public enum ExchangeType {
    Direct("direct", "direct"), Fanout("fanout", "fanout"), Headers("headers", "headers"), Topic("topic", "topic");

    private final String val;

    private final String description;

    private String toString;

    private ExchangeType(String val, String description) {
        this.val = val;
        this.description = description;
    }
    
    public String getVal() {
        return val;
    }
    
    public String getDescription() {
        return description;
    }
    
    @Override
    public String toString() {
        if (null == toString) {
            toString = new StringBuilder().append("ExchangeType[").append(val).append(':').append(description)
                    .append(']').toString();
        }
        return toString;
    }
}